<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Different Files</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }
        table, th, td {
            border: 1px solid black;
        }
        th, td {
            padding: 8px;
            text-align: left;
        }
    </style>
    <meta http-equiv="refresh" content="10">
</head>
<body>
<h2>不同文件</h2>
<table id="diffTable">
    <thead>
    <tr>
        <th>文件名</th>
    </tr>
    </thead>
    <tbody>
    <?php
    $filePath = '/var/www/html/filespan/file_span/diff_files';
    if (file_exists($filePath)) {
        $file = fopen($filePath, 'r');
        if ($file) {
            while (($line = fgets($file))!== false) {
                $fileName = trim($line);
                echo "<tr><td>$fileName</td></tr>";
            }
            fclose($file);
        }
    }
    ?>
    </tbody>
</table>
</body>
</html>